﻿using System.Diagnostics.Contracts;
using System.Threading;

namespace System.Reactive.Disposables
{
	public sealed class ContextDisposable
	{
		public SynchronizationContext Context
		{
			get
			{
				Contract.Ensures(Contract.Result<SynchronizationContext>() != null, null, "Contract.Result<SynchronizationContext>() != null");
				return null;
			}
		}

		public ContextDisposable(SynchronizationContext context, IDisposable disposable)
		{
			Contract.Requires(context != null, null, "context != null");
			Contract.Requires(disposable != null, null, "disposable != null");
			Contract.Ensures(object.ReferenceEquals(this.Context, context), null, "object.ReferenceEquals(this.Context, context)");
		}
	}
}